package test;
import java.util.Scanner;

class std{
	int id;
	int Esc;
	int Csc;
	int Msc;
	int aver;
	public void avr() {
		aver=(Esc+Csc+Msc)/3;
	}
}

public class jy {

	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		std std1=new std();
		std1.id=scanner.nextInt();
		std1.Esc=scanner.nextInt();
		std1.Csc=scanner.nextInt();
		std1.Msc=scanner.nextInt();
		std1.avr();
		System.out.println(std1.id+" "+std1.aver);
		scanner.close();
	}

}
